-
Notifications
You must be signed in to change notification settings - Fork 4
Add API to support wind grid display. #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
CrazyKidJack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, though a few questions.
Main question is: why is this in the API? We should strive to keep as much of the code in the frontend as possible. Is it here just to reduce the number of API calls to the wind data provider? If so, do we have a precedent for external API calls for other types of data being centralized here?
CrazyKidJack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the previous comments,
please review whether anonymous dictionary types should be converted to proper named types
The download and processing of the RAP GRIB file is memory intensive enough that it should not be done in the client, hence the API here. Because we store the processed wind-data in memory the load on the API is low once processing is complete. |
|
So the commented out stuff for writing to a CSV was with the initial thought that IRL, the RAP wind and temp data is actually also used by TFMS to calculate trajectories for TBFM in addition to EDST trajectory modeling. I wrote it in there just incase Kyle over at simtraffic wanted to grab the data for his project use. It can easily be cut if it wont be used, hence the commenting out. |
This adds an API endpoint that returns a down-selected dataset of current upper wind conditions (speed, direction, temp) within the queried flight level and bounds. This uses GRIB data taken from NOAA's RAP which is what the real EDST uses. This data is automatically updated at 5 minutes past the top of the hour, and held in RAM for rapid recall by the API.